<template>
  <div>
    <h1>经营看板</h1>
    <button @click="click">按钮</button>
    <button @click="click1">修改</button>
  </div>
</template>

<script>
export default {
  methods:{
    click(){
      const data = [
      {
        requestProcessing: "是",
            roleId: 1,
            rwId: 7,
            warehouseId: 2
      }
      ]
      this.$axios.post('/api/role_warehouse/add',	data).then(res => {
       console.log(res);
      //  if(res.data.code == "200"){
      //    this.$message({
      //      message: '新增成功',
      //      type: 'success'
      //    })
      //  } else{
      //    this.$message({A
      //      message:"新增失败",
      //      type:"error"
      //    })
      //  }
       })
    },
    click1(){
      const data = [
      {
        requestProcessing: "是",
            roleId: 1,
            rwId: 7,
            warehouseId: 2
      }
      ]
      this.$axios.post("/api/role_warehouse/update",
        data
      ).then(res => {
         console.log(res);
        if(res.data.code == '200'){
          this.$message({
           message: '修改成功',
           type: 'success'
         })
        }else{
          this.$message({
           message:"修改失败",
           type:"error"
         })
        }
       })
    }
  }
}
</script>

<style>

</style>